<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-bind:设置的属性可以和普通style设置的属性共存 -->
        <div style="background-color: yellowgreen;" :style="styleArr">box</div>
    </div>

    <script>
        new Vue({
            el:'#app',
            data(){
                return{
                    style:{
                        color:'red',
                        width:"100px",
                        heigth:'100px',
                        fontSize:'50px',
                    },
                    styleArr:[
                    {color:'red'},
                    {width:"100px"},
                    {heigth:'100px'},
                    {fontSize:'50px'}
                    ]
                }
            }
        })
    </script>
</body>
</html>